package com.loyal.mwm.util;

import android.os.Environment;

import com.base.kit.FileManager;

import java.io.File;

public class MemoryUtil extends FileManager {
    // sd卡路径
    private static final String SD_PATH = Environment.getExternalStorageDirectory().getPath();
    private static final String path_main = SD_PATH + File.separator + "com.mwm.loyal" + File.separator;
    // 本地保存文件
    public static final String path_local = path_main + "local" + File.separator;
    public static final String path_icon = path_main + "icon" + File.separator;
    public static final String path_temp = path_main + "temp" + File.separator;
    public static final String pic_UCrop = "UCrop.jpg";
    public static final String pic_temp = "temp.jpg";
    public static final String pic_tmp = "tmp.jpg";
    // apk更新下载的更新文件存放的目录
    public static final String path_apk = path_main + "apk" + File.separator;
    public static final String path_share = path_main + "share" + File.separator;
    public static final String apkFileName = "mwm.apk";
    private static final String[] PATHS = new String[]{path_local, path_icon,
            path_apk, path_temp, path_share};

    public static void mkPkgDirs() {
        for (String path : PATHS) {
            mkDirs(path);
        }
    }
}
